<?php

/**

 * 分销海报逻辑层

 * @author maniac

 */

namespace app\common\logic;


use app\common\model\Options AS OptionsModel;

use app\facade\UserLogs;


class DistributionPosters extends Options

{    

    /**

     * 编辑

     * @param  array $data 请求的信息

     */

    public function save($data)

    {

        $db = $data['db'];

        $update = [

            'id'           => $data['id'],

            'option_name'  => $data['option_name'],

            'option_value' => serialize($db),

        ];

        OptionsModel::update($update);

        UserLogs::insertLog(['title' => '修改分销海报', 'content' => "id={$data['id']}\r\noption_name={$data['option_name']}"]);

    }

}

